package oliver.shein.generic.service.impl;

import oliver.shein.generic.service.Generic;

import java.util.Random;

/**
 * @Author Oliver Wang
 * @Description
 * @Created by IntelliJ IDEA 2018.
 * @Date Create at 2018/10/29 17:18
 */
public class FruitGeneric<T> implements Generic {
    private T info;

    public FruitGeneric(T info){
        this.info = info;
    }

    private String[] fruits = new String[]{"Apple", "Banana", "Pear"};

    @Override
    public String next() {
        Random rand = new Random();
        return fruits[rand.nextInt(3)];
    }
}
